package com.power.ding.model;


import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
*  司法组织机构-被申请人实体类
*/

@Entity
@ApiModel(value="司法组织机构-被申请人")
@Data
@Table(name="Di_rel_dept_target")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Di_rel_dept_target.Di_rel_dept_targetPK.class) 用于复合组件
public class Di_rel_dept_target extends BaseModel implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "序号")
    private String id;

    @ApiModelProperty(value = "名称")
    private String orgname;

    @ApiModelProperty(value = "行政区域id")
    private String adid;

    @ApiModelProperty(value = "联系人id")
    private String contactuser;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("orgname", this.getOrgname());
        map.put("adid", this.getAdid());
        map.put("contactuser", this.getContactuser());
        return map;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Di_rel_dept_targetPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Di_rel_dept_targetPK pk = (Di_rel_dept_targetPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}